package com.pbking.util.logging
{
	/**
	 * Defines the log levels used in the PBLogger
	 */
	public class PBLogLevel
	{
	    public static const FATAL:int = 1000;
	    public static const ERROR:int = 8;
	    public static const WARN:int = 6;
	    public static const INFO:int = 4;
	    public static const DEBUG:int = 2;
	    
	    /**
	    * Determins the string representation of a log level
	    * 
	    * @param level int numerical log level
	    * 
	    * @return String the name of the log level
	    */
	    public static function getLevelLabel(level:int):String
	    {
	    	if (level >= FATAL) return "FATAL";

	    	if (level >= ERROR) return "ERROR";

	    	if (level >= WARN) return "WARN";

	    	if (level >= INFO) return "INFO";

			return "DEBUG";
				    	
	    }
	}
}